package com.xian.im.modules.im.core;

import com.xian.im.common.model.dto.OrganizationDto;
import com.xian.im.common.model.from.OrganizationFrom;
import com.xian.im.modules.im.controller.model.login.OrgLoginReq;

/**
 * @program: renrenio-renren-fast-master
 * @description:
 * @author: liru.xian
 * @create: 2021-01-15 18:08
 **/
public interface IOrganizationCoreService {

    /**
     * 创建机构
     * @param from
     * @return
     */
    OrganizationDto save(OrganizationFrom from);

    /**
     * 删除机构
     * @param from
     * @return
     */
    Boolean del(OrganizationFrom from);

    /**
     * 机构详情
     * @param id
     * @return
     */
    OrganizationDto detail(Long id);

    /**
     * 根据Ak 获取对象
     * @param ak
     * @return
     */
    OrganizationDto findByAK(String ak);
    /**
     *
     * @param unique
     * @return
     */
    OrganizationDto getByUnique(String unique);

    /**
     * 检查租户是否有登录权限
     * @param req
     * @return
     */
    Boolean checkLoginPermissions(OrgLoginReq req);

    /**
     *
     * @param from
     * @return
     */
    Integer ban(OrganizationFrom from);
}
